package ch.usi.inf.pf2.analyzer;

/**
 * 
 * @author Thomas Mantegazzi, Yotam Sharon
 * @date 20 april 2010
 *
 */

/**
 * A token is a piece of data input extracted from the input string. It can be
 * an operator, a function, a parenthesis,...
 * 
 */

public class Token {

	private String text;
	private int startPosition;
	private TokenType type;

	public Token(String text, int startPosition, TokenType type) {
		this.text = text;
		this.startPosition = startPosition;
		this.type = type;
	}

	public String getText() {
		return text;
	}

	public int getStartPosition() {
		return startPosition;
	}

	public TokenType getType() {
		return type;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void setStartPosition(int startPosition) {
		this.startPosition = startPosition;
	}

	public void setType(TokenType type) {
		this.type = type;
	}

}
